#include <WebSocket/types.h>
#include "../ChatConfig.h"
#include "../ChatBuffer.h"

int main()
{
    ChatConfig config;

    WS::TcpSocket::Desc desc;
    desc.host = config.serverHost.c_str();
    desc.port = config.serverPort;
    WS::TcpSocket tcpSocket;
    if(!tcpSocket.Create(desc))
    {
        LOGI("cannot create the tcpsocket");
        return 0;
    }
    while(1)
    {
        ChatBuffer buf;
        std::cout << "puts you chat" << std::endl;
        std::cin >> buf.buf;

        tcpSocket.Send<ChatBuffer>(buf);
        
    }

    return 0;
}